﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace TestStarter.Wpf.WpfWindow{
    /// <summary>
    /// Interaction logic for TestLauncher.xaml
    /// </summary>
     
    public partial class TestLauncher : Window
    {
        private static TestLauncher instance;
        public TestLauncher()
        {
            InitializeComponent();
            PopulateBrowserList();
            populateBrowserVersionList();
        }

        private void populateBrowserVersionList()
        {
            List<BrowserVersion> ListData = new List<BrowserVersion>();
            ListData.Add(new BrowserVersion { Id = "1", Version = "25" });
            ListData.Add(new BrowserVersion { Id = "2", Version = "24" });
            ListData.Add(new BrowserVersion { Id = "2", Version = "23" });
        }

        private void PopulateBrowserList()
        {
            List<Browser> ListData = new List<Browser>();
            ListData.Add(new Browser { Id = "1", Name = "Firefox" });
            ListData.Add(new Browser { Id = "2", Name = "Chrome" });
            ListData.Add(new Browser { Id = "3", Name = "Internet Explorer" });

            browserList.ItemsSource = ListData;
            browserList.DisplayMemberPath = "Name";
            browserList.SelectedValuePath = "Id";
            browserList.SelectedValue = "1";
        }

        public static TestLauncher Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new TestLauncher();
                }

                return instance; 
            }
        }

        private void DataGrid_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
        {

        }

        private void ComboBox_SelectionChanged_1(object sender, SelectionChangedEventArgs e)
        {

        }
    }

     

}
